﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace Claro.QuestionModel
{
    public class clsCurso
    {

        public int codCurso { get; set; }

        public string nmCurso { get; set; }

        public static DataTable SelecionarCursos()
        {
            SqlConnection cn = clsConexao.Conectar();
            SqlCommand cmd = cn.CreateCommand();
            cmd.CommandText = "SELECT codCurso, nmCurso from curso";
            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = cmd;
            DataTable dt = new DataTable();
            da.Fill(dt);

            cn.Close();
            cn.Dispose();
            return dt;
        }
        

    }
}
